<!-- HTML header for doxygen 1.8.20-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
	<meta http-equiv="X-UA-Compatible" content="IE=9"/>
	<meta name="generator" content="Doxygen 1.9.4"/>
	<meta name="viewport" content="width=device-width, initial-scale=1"/>
	<title>Raspberry Pi Pico SDK: hardware_rtc</title>
	<!-- <link href="tabs.css" rel="stylesheet" type="text/css"/> -->
	<script type="text/javascript" src="jquery.js"></script>
	<script type="text/javascript" src="dynsections.js"></script>
	<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
	<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
    <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500&display=swap" rel="stylesheet">
	<link href="doxygen.css" rel="stylesheet" type="text/css" />
	<link href="normalise.css" rel="stylesheet" type="text/css"/>
<link href="main.css" rel="stylesheet" type="text/css"/>
<link href="styles.css" rel="stylesheet" type="text/css"/>
</head>
<body>
	<div class="navigation-mobile">
		<div class="logo--mobile">
			<a href="/"><img src="logo-mobile.svg" alt="Raspberry Pi"></a>
		</div>
		<div class="navigation-toggle">
			<span class="line-1"></span>
			<span class="line-2">
				<p>Menu Toggle</p>
			</span>
			<span class="line-3"></span>
		</div>
	</div>
	<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
		<div class="logo">
			<a href="index.html"> <img src="logo.svg" alt="Raspberry Pi"></a>
			<span style="display: inline-block; margin-top: 10px;">
				v2.1.0
			</span>
		</div>
		<div class="navigation-footer">
			<img src="logo-mobile.svg" alt="Raspberry Pi">
			<a href="https://www.raspberrypi.com/" target="_blank">By Raspberry Pi Ltd</a>
		</div>
<!-- 		<div class="search">
			<form>
				<input type="search" name="search" id="search" placeholder="Search">
				<input type="submit" value="Search">
			</form>
		</div> -->
<!-- Generated by Doxygen 1.9.4 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search",'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('group__hardware__rtc.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle"><div class="title">hardware_rtc<div class="ingroups"><a class="el" href="group__hardware.html">Hardware APIs</a></div></div></div>
</div><!--header-->
<div class="contents">

<p>Hardware Real Time Clock API.  
<a href="#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="typedef-members" name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:ga05a9e12c70c56e6e2a9869d0682045d1"><td class="memItemLeft" align="right" valign="top">typedef void(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__rtc.html#ga05a9e12c70c56e6e2a9869d0682045d1">rtc_callback_t</a>) (void)</td></tr>
<tr class="separator:ga05a9e12c70c56e6e2a9869d0682045d1"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:gacf9024748b942a7ae375cf75951afa9c"><td class="memItemLeft" align="right" valign="top"><a id="gacf9024748b942a7ae375cf75951afa9c" name="gacf9024748b942a7ae375cf75951afa9c"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>rtc_init</b> (void)</td></tr>
<tr class="memdesc:gacf9024748b942a7ae375cf75951afa9c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialise the RTC system. <br /></td></tr>
<tr class="separator:gacf9024748b942a7ae375cf75951afa9c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga076d68dec35129dd2b44d16ae457a3de"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__rtc.html#ga076d68dec35129dd2b44d16ae457a3de">rtc_set_datetime</a> (const <a class="el" href="structdatetime__t.html">datetime_t</a> *t)</td></tr>
<tr class="memdesc:ga076d68dec35129dd2b44d16ae457a3de"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the RTC to the specified time.  <a href="group__hardware__rtc.html#ga076d68dec35129dd2b44d16ae457a3de">More...</a><br /></td></tr>
<tr class="separator:ga076d68dec35129dd2b44d16ae457a3de"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga7c5528e71733b7bfc0b0543cd3bb6d3f"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__rtc.html#ga7c5528e71733b7bfc0b0543cd3bb6d3f">rtc_get_datetime</a> (<a class="el" href="structdatetime__t.html">datetime_t</a> *t)</td></tr>
<tr class="memdesc:ga7c5528e71733b7bfc0b0543cd3bb6d3f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the current time from the RTC.  <a href="group__hardware__rtc.html#ga7c5528e71733b7bfc0b0543cd3bb6d3f">More...</a><br /></td></tr>
<tr class="separator:ga7c5528e71733b7bfc0b0543cd3bb6d3f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gabf6cc1546be8d1ddb56e3d83a915f683"><td class="memItemLeft" align="right" valign="top"><a id="gabf6cc1546be8d1ddb56e3d83a915f683" name="gabf6cc1546be8d1ddb56e3d83a915f683"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>rtc_running</b> (void)</td></tr>
<tr class="memdesc:gabf6cc1546be8d1ddb56e3d83a915f683"><td class="mdescLeft">&#160;</td><td class="mdescRight">Is the RTC running? <br /></td></tr>
<tr class="separator:gabf6cc1546be8d1ddb56e3d83a915f683"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaac8ad85f301295b6a130aa8e00122253"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__rtc.html#gaac8ad85f301295b6a130aa8e00122253">rtc_set_alarm</a> (const <a class="el" href="structdatetime__t.html">datetime_t</a> *t, <a class="el" href="group__hardware__rtc.html#ga05a9e12c70c56e6e2a9869d0682045d1">rtc_callback_t</a> user_callback)</td></tr>
<tr class="memdesc:gaac8ad85f301295b6a130aa8e00122253"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set a time in the future for the RTC to call a user provided callback.  <a href="group__hardware__rtc.html#gaac8ad85f301295b6a130aa8e00122253">More...</a><br /></td></tr>
<tr class="separator:gaac8ad85f301295b6a130aa8e00122253"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gab7f69ee0de1cae2518b2822fd82d5201"><td class="memItemLeft" align="right" valign="top"><a id="gab7f69ee0de1cae2518b2822fd82d5201" name="gab7f69ee0de1cae2518b2822fd82d5201"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>rtc_enable_alarm</b> (void)</td></tr>
<tr class="memdesc:gab7f69ee0de1cae2518b2822fd82d5201"><td class="mdescLeft">&#160;</td><td class="mdescRight">Enable the RTC alarm (if inactive) <br /></td></tr>
<tr class="separator:gab7f69ee0de1cae2518b2822fd82d5201"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga718b866eab2ba73221d37f7d15ba9737"><td class="memItemLeft" align="right" valign="top"><a id="ga718b866eab2ba73221d37f7d15ba9737" name="ga718b866eab2ba73221d37f7d15ba9737"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>rtc_disable_alarm</b> (void)</td></tr>
<tr class="memdesc:ga718b866eab2ba73221d37f7d15ba9737"><td class="mdescLeft">&#160;</td><td class="mdescRight">Disable the RTC alarm (if active) <br /></td></tr>
<tr class="separator:ga718b866eab2ba73221d37f7d15ba9737"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p >Hardware Real Time Clock API. </p>
<p >The RTC keeps track of time in human readable format and generates events when the time is equal to a preset value. Think of a digital clock, not epoch time used by most computers. There are seven fields, one each for year (12 bit), month (4 bit), day (5 bit), day of the week (3 bit), hour (5 bit) minute (6 bit) and second (6 bit), storing the data in binary format.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="structdatetime__t.html" title="Structure containing date and time information.">datetime_t</a></dd></dl>
<h2><a class="anchor" id="rtc_example"></a>
Example</h2>
<div class="fragment"><div class="line"> </div>
<div class="line"><span class="preprocessor">#include &lt;<a class="code" href="stdio_8h.html">stdio.h</a>&gt;</span></div>
<div class="line"><span class="preprocessor">#include &quot;<a class="code" href="rp2__common_2hardware__rtc_2include_2hardware_2rtc_8h.html">hardware/rtc.h</a>&quot;</span></div>
<div class="line"><span class="preprocessor">#include &quot;<a class="code" href="stdlib_8h.html">pico/stdlib.h</a>&quot;</span></div>
<div class="line"><span class="preprocessor">#include &quot;<a class="code" href="datetime_8h.html">pico/util/datetime.h</a>&quot;</span></div>
<div class="line"> </div>
<div class="line"><span class="keywordtype">int</span> main() {</div>
<div class="line">    <a class="code hl_function" href="group__pico__stdio.html#ga0e604311fb226dae91ff4eb17a19d67a">stdio_init_all</a>();</div>
<div class="line">    printf(<span class="stringliteral">&quot;Hello RTC!\n&quot;</span>);</div>
<div class="line"> </div>
<div class="line">    <span class="keywordtype">char</span> datetime_buf[256];</div>
<div class="line">    <span class="keywordtype">char</span> *datetime_str = &amp;datetime_buf[0];</div>
<div class="line"> </div>
<div class="line">    <span class="comment">// Start on Friday 5th of June 2020 15:45:00</span></div>
<div class="line">    <a class="code hl_struct" href="structdatetime__t.html">datetime_t</a> t = {</div>
<div class="line">            .<a class="code hl_variable" href="structdatetime__t.html#a9d974362ac5b0c3981a376888cec7a5a">year</a>  = 2020,</div>
<div class="line">            .month = 06,</div>
<div class="line">            .day   = 05,</div>
<div class="line">            .dotw  = 5, <span class="comment">// 0 is Sunday, so 5 is Friday</span></div>
<div class="line">            .hour  = 15,</div>
<div class="line">            .min   = 45,</div>
<div class="line">            .sec   = 00</div>
<div class="line">    };</div>
<div class="line"> </div>
<div class="line">    <span class="comment">// Start the RTC</span></div>
<div class="line">    <a class="code hl_function" href="group__hardware__rtc.html#gacf9024748b942a7ae375cf75951afa9c">rtc_init</a>();</div>
<div class="line">    <a class="code hl_function" href="group__hardware__rtc.html#ga076d68dec35129dd2b44d16ae457a3de">rtc_set_datetime</a>(&amp;t);</div>
<div class="line"> </div>
<div class="line">    <span class="comment">// clk_sys is &gt;2000x faster than clk_rtc, so datetime is not updated immediately when rtc_get_datetime() is called.</span></div>
<div class="line">    <span class="comment">// The delay is up to 3 RTC clock cycles (which is 64us with the default clock settings)</span></div>
<div class="line">    <a class="code hl_function" href="group__sleep.html#gaeeaebd3a10e0a193022f15c8603772ba">sleep_us</a>(64);</div>
<div class="line"> </div>
<div class="line">    <span class="comment">// Print the time</span></div>
<div class="line">    <span class="keywordflow">while</span> (<span class="keyword">true</span>) {</div>
<div class="line">        <a class="code hl_function" href="group__hardware__rtc.html#ga7c5528e71733b7bfc0b0543cd3bb6d3f">rtc_get_datetime</a>(&amp;t);</div>
<div class="line">        datetime_to_str(datetime_str, <span class="keyword">sizeof</span>(datetime_buf), &amp;t);</div>
<div class="line">        printf(<span class="stringliteral">&quot;\r%s      &quot;</span>, datetime_str);</div>
<div class="line">        <a class="code hl_function" href="group__sleep.html#gae617a6842d4f3a192064c4354b88fcff">sleep_ms</a>(100);</div>
<div class="line">    }</div>
<div class="line">}</div>
<div class="ttc" id="adatetime_8h_html"><div class="ttname"><a href="datetime_8h.html">datetime.h</a></div></div>
<div class="ttc" id="agroup__hardware__rtc_html_ga076d68dec35129dd2b44d16ae457a3de"><div class="ttname"><a href="group__hardware__rtc.html#ga076d68dec35129dd2b44d16ae457a3de">rtc_set_datetime</a></div><div class="ttdeci">bool rtc_set_datetime(const datetime_t *t)</div><div class="ttdoc">Set the RTC to the specified time.</div><div class="ttdef"><b>Definition:</b> rtc.c:54</div></div>
<div class="ttc" id="agroup__hardware__rtc_html_ga7c5528e71733b7bfc0b0543cd3bb6d3f"><div class="ttname"><a href="group__hardware__rtc.html#ga7c5528e71733b7bfc0b0543cd3bb6d3f">rtc_get_datetime</a></div><div class="ttdeci">bool rtc_get_datetime(datetime_t *t)</div><div class="ttdoc">Get the current time from the RTC.</div><div class="ttdef"><b>Definition:</b> rtc.c:87</div></div>
<div class="ttc" id="agroup__hardware__rtc_html_gacf9024748b942a7ae375cf75951afa9c"><div class="ttname"><a href="group__hardware__rtc.html#gacf9024748b942a7ae375cf75951afa9c">rtc_init</a></div><div class="ttdeci">void rtc_init(void)</div><div class="ttdoc">Initialise the RTC system.</div><div class="ttdef"><b>Definition:</b> rtc.c:22</div></div>
<div class="ttc" id="agroup__pico__stdio_html_ga0e604311fb226dae91ff4eb17a19d67a"><div class="ttname"><a href="group__pico__stdio.html#ga0e604311fb226dae91ff4eb17a19d67a">stdio_init_all</a></div><div class="ttdeci">bool stdio_init_all(void)</div><div class="ttdoc">Initialize all of the present standard stdio types that are linked into the binary.</div><div class="ttdef"><b>Definition:</b> stdio.c:200</div></div>
<div class="ttc" id="agroup__sleep_html_gae617a6842d4f3a192064c4354b88fcff"><div class="ttname"><a href="group__sleep.html#gae617a6842d4f3a192064c4354b88fcff">sleep_ms</a></div><div class="ttdeci">void sleep_ms(uint32_t ms)</div><div class="ttdoc">Wait for the given number of milliseconds before returning.</div><div class="ttdef"><b>Definition:</b> time.c:439</div></div>
<div class="ttc" id="agroup__sleep_html_gaeeaebd3a10e0a193022f15c8603772ba"><div class="ttname"><a href="group__sleep.html#gaeeaebd3a10e0a193022f15c8603772ba">sleep_us</a></div><div class="ttdeci">void sleep_us(uint64_t us)</div><div class="ttdoc">Wait for the given number of microseconds before returning.</div><div class="ttdef"><b>Definition:</b> time.c:422</div></div>
<div class="ttc" id="arp2__common_2hardware__rtc_2include_2hardware_2rtc_8h_html"><div class="ttname"><a href="rp2__common_2hardware__rtc_2include_2hardware_2rtc_8h.html">rtc.h</a></div></div>
<div class="ttc" id="astdio_8h_html"><div class="ttname"><a href="stdio_8h.html">stdio.h</a></div></div>
<div class="ttc" id="astdlib_8h_html"><div class="ttname"><a href="stdlib_8h.html">stdlib.h</a></div></div>
<div class="ttc" id="astructdatetime__t_html"><div class="ttname"><a href="structdatetime__t.html">datetime_t</a></div><div class="ttdoc">Structure containing date and time information.</div><div class="ttdef"><b>Definition:</b> types.h:107</div></div>
<div class="ttc" id="astructdatetime__t_html_a9d974362ac5b0c3981a376888cec7a5a"><div class="ttname"><a href="structdatetime__t.html#a9d974362ac5b0c3981a376888cec7a5a">datetime_t::year</a></div><div class="ttdeci">int16_t year</div><div class="ttdoc">0..4095</div><div class="ttdef"><b>Definition:</b> types.h:108</div></div>
</div><!-- fragment --> <h2 class="groupheader">Typedef Documentation</h2>
<a id="ga05a9e12c70c56e6e2a9869d0682045d1" name="ga05a9e12c70c56e6e2a9869d0682045d1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga05a9e12c70c56e6e2a9869d0682045d1">&#9670;&nbsp;</a></span>rtc_callback_t</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef void(* rtc_callback_t) (void)</td>
        </tr>
      </table>
</div><div class="memdoc">
<p >Callback function type for RTC alarms</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__hardware__rtc.html#gaac8ad85f301295b6a130aa8e00122253" title="Set a time in the future for the RTC to call a user provided callback.">rtc_set_alarm()</a> </dd></dl>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a id="ga7c5528e71733b7bfc0b0543cd3bb6d3f" name="ga7c5528e71733b7bfc0b0543cd3bb6d3f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga7c5528e71733b7bfc0b0543cd3bb6d3f">&#9670;&nbsp;</a></span>rtc_get_datetime()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool rtc_get_datetime </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structdatetime__t.html">datetime_t</a> *&#160;</td>
          <td class="paramname"><em>t</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the current time from the RTC. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">t</td><td>Pointer to a <a class="el" href="structdatetime__t.html">datetime_t</a> structure to receive the current RTC time </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true if datetime is valid, false if the RTC is not running. </dd></dl>

</div>
</div>
<a id="gaac8ad85f301295b6a130aa8e00122253" name="gaac8ad85f301295b6a130aa8e00122253"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaac8ad85f301295b6a130aa8e00122253">&#9670;&nbsp;</a></span>rtc_set_alarm()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void rtc_set_alarm </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structdatetime__t.html">datetime_t</a> *&#160;</td>
          <td class="paramname"><em>t</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__hardware__rtc.html#ga05a9e12c70c56e6e2a9869d0682045d1">rtc_callback_t</a>&#160;</td>
          <td class="paramname"><em>user_callback</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set a time in the future for the RTC to call a user provided callback. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">t</td><td>Pointer to a <a class="el" href="structdatetime__t.html">datetime_t</a> structure containing a time in the future to fire the alarm. Any values set to -1 will not be matched on. </td></tr>
    <tr><td class="paramname">user_callback</td><td>pointer to a <a class="el" href="group__hardware__rtc.html#ga05a9e12c70c56e6e2a9869d0682045d1">rtc_callback_t</a> to call when the alarm fires </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga076d68dec35129dd2b44d16ae457a3de" name="ga076d68dec35129dd2b44d16ae457a3de"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga076d68dec35129dd2b44d16ae457a3de">&#9670;&nbsp;</a></span>rtc_set_datetime()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool rtc_set_datetime </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structdatetime__t.html">datetime_t</a> *&#160;</td>
          <td class="paramname"><em>t</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set the RTC to the specified time. </p>
<dl class="section note"><dt>Note</dt><dd>Note that after setting the RTC date and time, a subsequent read of the values (e.g. via <a class="el" href="group__hardware__rtc.html#ga7c5528e71733b7bfc0b0543cd3bb6d3f" title="Get the current time from the RTC.">rtc_get_datetime()</a>) may not reflect the new setting until up to three cycles of the potentially-much-slower RTC clock domain have passed. This represents a period of 64 microseconds with the default RTC clock configuration.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">t</td><td>Pointer to a <a class="el" href="structdatetime__t.html">datetime_t</a> structure contains time to set </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true if set, false if the passed in datetime was invalid. </dd></dl>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->

	<script src="main.js"></script>
</body>
</html>